﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class admin_dangnhap : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
    {
        NguoiDung nd = new NguoiDung();
       
        if (nd.CheckUser(Login1.UserName, Login1.Password) == true)
        {
            Session["username_admin"] = Login1.UserName;
            Session["password_admin"] = Login1.Password;
            Response.Redirect("admin.aspx");
        }
    }
}